cmake_minimum_required(VERSION 3.10)
project(TodoApp)

set(CMAKE_CXX_STANDARD 11)

# 设置MySQL Connector/C++的路径
set(MYSQL_CONNECTOR_CPP_DIR /path/to/mysql-connector-cpp)
set(MYSQL_CONNECTOR_CPP_INCLUDE_DIR ${MYSQL_CONNECTOR_CPP_DIR}/include)
set(MYSQL_CONNECTOR_CPP_LIB_DIR ${MYSQL_CONNECTOR_CPP_DIR}/lib64)

# 添加MySQL Connector/C++的头文件路径
include_directories(${MYSQL_CONNECTOR_CPP_INCLUDE_DIR})

# 添加可执行文件
add_executable(todo_app src/main.cpp)

# 链接MySQL Connector/C++库
target_link_libraries(todo_app 
    ${MYSQL_CONNECTOR_CPP_LIB_DIR}/libmysqlcppconn-static.a 
    pthread 
    ssl 
    crypto
)
    